VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "msmask32.ocx"
Begin VB.Form frmConstanciaTrabajoAdmon 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "Constancia de Trabajo"
   ClientHeight    =   2796
   ClientLeft      =   48
   ClientTop       =   312
   ClientWidth     =   6156
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2796
   ScaleWidth      =   6156
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtResponsable 
      Height          =   288
      Left            =   240
      TabIndex        =   6
      Text            =   "Text1"
      Top             =   1440
      Width           =   5532
   End
   Begin VB.CommandButton cmdImprimir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Imprimir"
      Height          =   615
      Left            =   4200
      Picture         =   "frmConstanciaTrabajoAdmon.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   1920
      Width           =   732
   End
   Begin VB.CommandButton CmdSalir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   5040
      Picture         =   "frmConstanciaTrabajoAdmon.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1920
      Width           =   732
   End
   Begin MSMask.MaskEdBox MskFin 
      Height          =   252
      Left            =   4560
      TabIndex        =   0
      Top             =   600
      Width           =   1212
      _ExtentX        =   2138
      _ExtentY        =   445
      _Version        =   393216
      MaxLength       =   10
      Mask            =   "##/##/####"
      PromptChar      =   "_"
   End
   Begin MSDataListLib.DataCombo cboEmpleados 
      Bindings        =   "frmConstanciaTrabajoAdmon.frx":0894
      Height          =   288
      Left            =   240
      TabIndex        =   1
      Top             =   600
      Width           =   3972
      _ExtentX        =   7006
      _ExtentY        =   508
      _Version        =   393216
      ListField       =   "nombres"
      BoundColumn     =   "codigo_empleado"
      Text            =   "DataCombo1"
      Object.DataMember      =   "Nombres_Empleados"
   End
   Begin VB.Label Label4 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Responsable de Emitir Constancia"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   7.8
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00400000&
      Height          =   252
      Left            =   240
      TabIndex        =   7
      Top             =   1200
      Width           =   2532
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Nombre del Empleado"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   7.8
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00400000&
      Height          =   252
      Left            =   240
      TabIndex        =   3
      Top             =   360
      Width           =   1452
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Laboro Hasta"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   7.8
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00400000&
      Height          =   252
      Left            =   4560
      TabIndex        =   2
      Top             =   360
      Width           =   372
   End
End
Attribute VB_Name = "frmConstanciaTrabajoAdmon"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdImprimir_Click()
        Dim mes As Integer
        
        If Not cboEmpleados.MatchedWithList Then Exit Sub
        
        If MskFin.Text = "__/__/____" Then
            MsgBox "Las fechas no pueden quedar sin datos"
            Exit Sub
        End If
        
        
       responsable = UCase(txtResponsable.Text)
        
               
       'Para saber el perfil del empleado
       Dim rsNombre  As ADODB.Recordset
       Set rsNombre = New ADODB.Recordset
       rsNombre.Open "select nombres from nombrestodos where codigo_empleado = '" & cboEmpleados.BoundText & "'", DE.Cnn, adOpenDynamic, adLockReadOnly
       nombre = rsNombre.Fields("nombres").Value
       
        
              
        RutaReportes = DE.rsGENCParametros.Fields("RUTA_REPORTES")
        MDI.Reporte.StoredProcParam(0) = cboEmpleados.BoundText
        MDI.Reporte.StoredProcParam(1) = MskFin.Text
        MDI.Reporte.StoredProcParam(2) = nombre
        MDI.Reporte.StoredProcParam(3) = responsable
        
        Imprimir RutaReportes & "ConstanciadeTrabajoAdmon.rpt", "", "", "", ""

End Sub

